package it.polito.connectedcar.network;


public class EntityNetworkConnectorFactory {

	private static NetworkConnectorFactory connectorFactory;
	
	public static NetworkConnectorFactory newFactoryInstance()
	{
		if(connectorFactory==null)
		{
			String runningMode = System.getProperty("runningMode");
			if(runningMode !=null &&runningMode.equalsIgnoreCase("real"))
				connectorFactory =  new SimpleNetworkConnectorFactory();
			else
				connectorFactory =  new SimulatedNetworkConnectorFactory();
		}
		return connectorFactory;
	}
	
}
